/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package jmenu.main;

/**
 *
 * @author Boner
 */
public class FitnessTools {

    public static double getBMI()
    {
        return 0.0;
    }

    public static  double [] getRatioOfMeal(int meal, double b, double s )
    {
        double [] i = new double[2];
        switch(meal)
        {
            case 1:
                i[0] = b/75*5;
                i[1] = s/100*20;
            break;
            case 2:
                i[0] = b/75*10;
                i[1] = s/100*15;
            break;
            case 3:
                i[0] = b/75*10;
                i[1] = s/100*15;
            break;
            case 4:
                i[0] = b/75*10;
                i[1] = s/100*15;
            break;
            case 5:
                i[0] = b/75*10;
                i[1] = s/100*15;
            break;
            case 6:
                i[0] = b/75*15;
                i[1] = s/100*10;
            break;
            case 7:
                i[0] = b/75*15;
                i[1] = s/100*10;
            break;
            default:
                i[0] = 0.0;
                i[1] = 0.0;
            break;
        }
        return i;
    }

    public static double [] getRecomendedData(int gender,int program, double weight)
    {
        double [] i = new double[5];
        //double e, double b, double s, double t, double ch

        if (gender == Gender.MAN)
        {
            if(program == FitnessProgram.SLIMMING)
            {
                //bilkoviny
                i[1] = (weight - 70) * 1 + 120;
                //sacharidy
                i[2] = 150 + (weight - 60) * 1.5;
                //tuky
                i[3] = 15 + (weight - 45) * 0.2;
                //cholersterol
                i[4] = 0;
                //energie
                i[0] = 17.424 * ( 1 * i[1] + 1 * i[2] + 2 * i[3] );

            }
            else if(program == FitnessProgram.BOOSTING)
            {
                //bilkoviny
                i[1] = weight * 2.8;
                //sacharidy
                i[2] = 350 + ( weight - 70 ) * 5;
                //tuky
                i[3] = weight * 0.5;
                //cholersterol
                i[4] = 0;
                //energie
                i[0] = 17.424 * ( 1 * i[1] + 1 * i[2] + 2 * i[3] );
            }
        }
        else if (gender == Gender.WOMAN)
        {
            if(program == FitnessProgram.SLIMMING)
            {
                //bilkoviny
                i[1] = 60 + ( weight - 45 ) * 0.5;
                //sacharidy
                i[2] = 90 + ( weight - 45 ) * 1.2;
                //tuky
                i[3] = 15 + ( weight - 45 ) * 0.1;
                //cholersterol
                i[4] = 0;
                //energie
                i[0] = 17.424 * ( 1 * i[1] + 1 * i[2] + 2 * i[3] );

            }
            else if(program == FitnessProgram.BOOSTING)
            {
                //bilkoviny
                i[1] = weight * 2.0;
                //sacharidy
                i[2] = 160 + ( weight - 45 ) * 2;
                //tuky
                i[3] = weight * 0.3;
                //cholersterol
                i[4] = 0;
                //energie
                i[0] = 17.424 * ( 1 * i[1] + 1 * i[2] + 2 * i[3] );
            }
        }

       return i;
    }
}
